package cn.kgc.client;
import cn.kgc.pojo.DmImage;

import cn.kgc.fallback.DmImageClientFallBack;
import java.util.List;
import java.util.Map;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

/**
 * Created by shang-pc on 2018/5/15.
 */
@FeignClient(name = "dm-base-provider", fallback = DmImageClientFallBack.class)
public interface RestDmImageClient {

    @PostMapping(value = "/getDmImageDefaultImage")
    public List<DmImage> getDmImage_DefaultImage(
            @RequestParam Long id,
            @RequestParam Integer type,
            @RequestParam Integer category);

    @RequestMapping(value = "/getDmImageById",method = RequestMethod.POST)
    public DmImage getDmImageById(@RequestParam("id") Long id)throws Exception;

    @RequestMapping(value = "/getDmImageListByMap",method = RequestMethod.POST)
    public List<DmImage>    getDmImageListByMap(@RequestParam Map
            <String,Object> param)throws Exception;

    @RequestMapping(value = "/getDmImageCountByMap",method = RequestMethod.POST)
    public Integer getDmImageCountByMap(@RequestParam Map
            <String,Object> param)throws Exception;

    @RequestMapping(value = "/qdtxAddDmImage",method = RequestMethod.POST)
    public Integer qdtxAddDmImage(@RequestBody DmImage dmImage)throws Exception;

    @RequestMapping(value = "/qdtxModifyDmImage",method = RequestMethod.POST)
    public Integer qdtxModifyDmImage(@RequestBody DmImage dmImage)throws Exception;

    @RequestMapping(value = "/qddelDmImage",method = RequestMethod.GET)
    public Integer qdtxDelDmImage(@RequestParam("id") Long id)throws Exception;
}
